<div class="post">
  <?php echo CHtml::link("#{$torrent->id}",array('/torrent/show/'.$torrent->id),
	  array(
      'class'=>'cid',
      'title'=>'Permalink to this torrent',
  )); ?>
	<div class="title">
    <?php echo CHtml::link(CHtml::encode($torrent->name),'/torrent/show/'.$torrent->id); ?>&nbsp;
	<?php echo $torrent->seeders." | ".$torrent->leechers; ?>
  </div>
  <div class="content">
    <?php echo $torrent->description; ?>
  </div>
  <div class="nav">
    <?php echo CHtml::link('Download',array('/torrent/download/'.$torrent->id)); ?> |
    <?php if(!Yii::app()->user->isGuest && User::model()->findByPk(Yii::app()->user->id)->username == $torrent->uploader->username): ?>
    <?php echo CHtml::link('Delete',array('/torrent/delete/'.$torrent->id)); ?> |
    <?php endif; ?>
    Last updated on <?php echo $torrent->added; ?>
  </div>
</div><!-- torrent -->
